package com.itheima.atte.controller;

import com.itheima.atte.dto.AttendPunchDTO;
import com.itheima.atte.service.IAttendPunchService;
import com.itheima.common.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AttendPunchController {

    @Autowired
    private IAttendPunchService attendPunchService;

    /**
     * 考勤打卡
     * 移动端
     */
    @PostMapping(value = "/atte/punch")
    public Result punch(@RequestBody AttendPunchDTO attendPunchDTO) throws Exception {
       attendPunchService.punch(attendPunchDTO);
        return Result.success();
    }
}
